package com.qf.userinformationsystem.service.impl;

import com.qf.userinformationsystem.mapper.LoginAndRegisterMapper;
import com.qf.userinformationsystem.pojo.LoginAndRegister;
import com.qf.userinformationsystem.service.LoginAndRegisterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LoginAndRegisterServiceImpl implements LoginAndRegisterService {
    @Resource
    LoginAndRegisterMapper loginAndRegisterMapper;


    @Override
    public List<LoginAndRegister> checkLogin(String account, String password) {
        List<LoginAndRegister> loginAndRegisters = loginAndRegisterMapper.checkLogin(account, password);
        return loginAndRegisters;
    }

    @Override
    public List<LoginAndRegister> checkAccount(String account) {
        List<LoginAndRegister> loginAndRegisters = loginAndRegisterMapper.checkAccount(account);
        return loginAndRegisters;
    }

    @Override
    public int insert(String account, String password,String confirmPassword) {
        int insert = loginAndRegisterMapper.insert(account,password,confirmPassword);
        return insert;
    }
}
